/**
 * @(#)CommonDescendingComparator.java Aug 17, 2009
 *   
 * Copyright  (c) 2009-2013 XLab,  Org. 
 * All  rights  reserved.   
 * TODO
 */

package org.xlab.baseframework.common.comparator;

import java.util.Comparator;

/**
 * 通用的降序比较器
 * 
 * @author MaKuBEX Email:makubexnet@gmail.com
 * @version 1.0.0
 */
public class CommonDescendingComparator implements Comparator<Object> {

	/**
	 * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
	 */
	public int compare(Object o1, Object o2) {
		if (o1.hashCode() > o2.hashCode())
			return -1;
		else if (o1.hashCode() == o2.hashCode())
			return 0;
		else
			return 1;
	}

}
